<script>
	var AlertInput = "Please enter :\n";
	function web_mail_login(form){
		var mesg = "";
		if(form.name.value == "") mesg += "Username\n";
		if(form.passwd.value == "") mesg += "Password\n";
		if(form.checkcode.value == "") mesg += "Confirmation code\n";
		if(mesg != ""){
			mesg = AlertInput + mesg;
			alert(mesg);
			return false;
		}
		// if (form.language.value !="-") form.Lang.value = form.language.value;
		//form.action = "login.php?Cmd=login";
		form.submit();
	}
	function reload_check(img){
		var date = new Date();
		img.src = "http://mail.nlsde.buaa.edu.cn/checkcode.php?"+date.getTime();
	}

</script>
<table>
	<tr>
		<td><img src="<?php echo base_path().drupal_get_path('module', 'nlsde')."/web_mail.png"?>"  style="width:60px"/></td>
		<td>
			<form name="login" method="post" target="_blank" action="http://mail.nlsde.buaa.edu.cn/login.php?Cmd=login" onsubmit="web_mail_login(this);return false">
				<div><label>Username</label>
				<input name="name" type="text" size="14"/></div>
				@<select name="domain" size="1">
						<option selected="selected" value="nlsde.buaa.edu.cn">nlsde.buaa.edu.cn</option>
				</select>
				<div><label>Password</label>
				<input name="passwd" type="password" size="14"/></div>
				<div><label>Confirmation Code</label>
				<input name="checkcode" type="text" size="5"/><img onclick="reload_check(this)" src="http://mail.nlsde.buaa.edu.cn/checkcode.php"></div>
				<input type="reset" value="Reset"/>
				<input type="submit" value="Login" />
			</form>
		</td>
	</tr>
</table>